package iss.java;

import iss.java.list.MyList;
import iss.java.list.Node;

import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/
public class
Main {
    public static void main(String[] args) {
        MyList list = new MyList();
        System.out.println("ID of list is "+list.getID());
        list.insert(list.getHead(), 5);
        list.insert(list.getHead(), 4);
        list.insert(list.getHead(), 3);
        list.insert(list.getHead(), 2);
        list.insert(list.getHead(), 1);
        list.forwardPrint();

        MyList list1=new MyList();
        System.out.println("ID of list1 is "+list1.getID());
        list1.insert(list.getHead(),50);
        list1.remove(list.getHead().getNext());

        MyList list2=new MyList();
        System.out.println("ID of list2 is "+list2.getID());
        list2.insert(list.getHead(),50);
        list2.remove(list.getHead().getNext());

        list.forwardPrint();




    }
}

